<?php 
include_once('Constants.php');
class Response {
	var $code = RESPONSE_ERROR;
	var $msg = null;
	var $data = null;

	function toJson() {
		$responseMap = array(
			"code" => $this->code,
			"msg" => $this->msg,
			"data" => $this->data
		);
		return json_encode($responseMap);
	}
}
?>